home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / TVINT15N.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  2KB  |  45 lines

  1. /*=======================================================*/
  2. /*  TVINT15N.C                                           */
  3. /*     low-level functions for TV software interrupts    */
  4. /*     requires MASM or A86 to recompile                 */
  5. /*                                                       */
  6. /*  (c) Copyright 1988 Ralf Brown  All Rights Reserved   */
  7. /*  May be freely copied for noncommercial use, so long  */
  8. /*  as this copyright notice remains intact, and any     */
  9. /*  changes are marked in the comment blocks preceding   */
  10. /*  functions.                                           */
  11. /*=======================================================*/
  12.  
  13. #pragma inline
  14.  
  15. #include "tvapi.h"
  16.  
  17. /*======================================================*/
  18. /* _TVnotify_handler  low-level function which passes   */
  19. /*                   control to user notification       */
  20. /*                   handler                            */
  21. /*   Ralf Brown 4/4/88                                  */
  22. /*======================================================*/
  23.  
  24. void far pascal _TVnotify_handler(void)
  25. {
  26.    asm push bp
  27.    asm push ds
  28.    asm push di
  29. /* now that we've saved all the necessary registers, call the real handler */
  30.    asm mov bp,sp
  31.    asm sub sp,4
  32.    asm mov [bp-4],si     /* build return address, and then jump to it */
  33.    asm mov [bp-2],ds
  34.    asm mov ax,DGROUP      /* initialize DS to our own data segment */
  35.    asm mov ds,ax
  36.    asm call dword ptr [bp-4]
  37.    asm mov sp,bp
  38. /* restore the registers and return */
  39.    asm pop di
  40.    asm pop ds
  41.    asm pop bp
  42. }
  43.  
  44. /* End of TVINT15N.C */
  45.